Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build & run streamlining #55

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

guillheu
Copy link

@guillheu guillheu commented Sep 5, 2024

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.8.0 and above.
  • I ran pre-commit checks against my changes.
  • I've written tests against my changes and all the current present tests are passing.

Current behaviour

The overall build and run pipelines are a mess, both for this and the collector. settings.json and projects.json files being created and populated at run time is a hacky way to merge configuration sources. Similarily, the docker image does not have a default entrypoint, but does expect a very specific command in order to run at all, which is instead defined in the docker-compose.yaml manifest under the command service fields.

New expected behaviour

This is a small PR that aims to make the docker images a little easier to work with outside of the provided docker-compose.

Change logs

  • The creation of config/settings.json and config/projects.json is now in the Dockerfile instead of the snapshotter_autofill.sh script, which shouldn't break the overall command chain but would make it possible for someone to mount a custom settings.json file at runtime and is overall better practice since that settings file is simply a default that is common to all container images
  • Renaming init_docker.sh to docker-entrypoint.sh, which is a standard name easier to work with from the outside
  • Wrapping the execution of snapshotter_autofill.sh inside of the newly renamed docker-entrypoint.sh, again making it easier to work with the container outside of the provided docker-compose
  • Adding an ENTRYPOINT to the Dockerfile to ensure correct default behavior
  • ... and as a result, removing the now redundant command fields from the docker-compose

@guillheu
Copy link
Author

guillheu commented Sep 5, 2024

This is a joint PR with the collector. That PR contains streamlining of the collector docker image build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant